		TITLE	EXEINIT - Copyright (c) SLR Systems 1994

		INCLUDE	MACROS

		PUBLIC	DO_EXE_INIT,SET_EXEPACK_STUFF


		.DATA

		EXTERNDEF	EXE_OUT_POSITION:DWORD,FINAL_HIGH_WATER:DWORD,NEW_REPT_ADDR:DWORD,TARG_ADDR:DWORD
		EXTERNDEF	DOSX_HDR_SIZE:DWORD

		EXTERNDEF	EXEPACK_ROUTINE:DWORD


		.CODE	PASS2_TEXT

		EXTERNDEF	REXE_INIT:PROC


DO_EXE_INIT	PROC
		;
		;
		;
		ADD	EAX,DOSX_HDR_SIZE

		MOV	EXE_OUT_POSITION,EAX
		MOV	FINAL_HIGH_WATER,EAX

		SUB	EAX,2
if	fg_slrpack
		BITT	SLRPACK_FLAG
		JZ	L53$

		MOV	EAX,-2

endif

L53$:

DO_EXE_INIT	ENDP


SET_EXEPACK_STUFF	PROC
		;
		;
		;
		MOV	NEW_REPT_ADDR,EAX
		ADD	EAX,2

		MOV	TARG_ADDR,EAX

		MOV	EXEPACK_ROUTINE,OFF REXE_INIT

		RESS	EXEPACK_FLUSHING

		RET

SET_EXEPACK_STUFF	ENDP


		END

